<?php

@error_reporting(0);
@set_time_limit(0);
@set_magic_quotes_runtime(0);
@ini_set('memory_limit', '512M');
require_once '../../dz_framework/init.php';
$course_id = isset($_REQUEST['course_id']) ? $_REQUEST['course_id'] : '';
$user_id = isset($_REQUEST['user_id']) ? $_REQUEST['user_id'] : '';
$class_course_hour_path = libfile('hschool/course_hour', 'class/admin', '..');
if (file_exists($class_course_hour_path) && $course_id) {
    require_once $class_course_hour_path;
    $hschool_course_hour = new hschool_course_hour();
    $files_result = $hschool_course_hour->get_course_hour_files('course_hour', $course_id);
    echo $files_result;
} elseif (file_exists($class_course_hour_path) && $user_id) {
    require_once $class_course_hour_path;
    $hschool_course_hour = new hschool_course_hour();
    $files_result = $hschool_course_hour->get_course_hour_files('user', $user_id);
    echo $files_result;
}
?>